zip -r XY-example.zip XY

x=test-case-notes
pandoc $x.org -f org -t markdown -o $x.md

ncat.exe -l -p 4000 -e cmd.exe
# ncat.exe -l -p 4000 -e powershell.exe # 🦜 : bad
ping 192.168.1.111 
nc 192.168.1.111 4000

# telnet into switch
telnet 192.168.1.112

# --------------------------------------------------
iface1=enp45s0
# sudo ip addr add 192.168.1.1/24 dev $iface1
# ping 192.168.1.111
sudo ip addr add 10.112.140.120/24 dev $iface1
ping 10.112.140.119

jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --IdentityProvider.token bd20b33f96c5dab031c166bffb807532eaa7ca92ecd87164
jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --IdentityProvider.token aaa

# 0. tmp -> there
f='tmp.txt'
smbclient --no-pass --user='\w14512%Wyq qwaszx!@' --ip-address='192.168.1.111' '\\Q13140Q\Users' \
          --command "put ${f} w14512/Downloads/hi/${f}" # ✅️

# 0. tmp -> here
f='tmp.txt'
rm $f
smbget --no-pass --user='\w14512%Wyq qwaszx!@' "smb://192.168.1.111/Users/w14512/Downloads/hi/${f}" # ✅️

# 1. file -> here
rm -v ./sync.sh
smbget --no-pass --user='\w14512%Wyq qwaszx!@' 'smb://192.168.1.111/Users/w14512/Downloads/hi/0627-press-in-md.rar' # ✅️
# 2. folder ->  here
mkdir ./hilab
cd ./hilab
smbget --no-pass --recursive --update --dots --user='\w14512%Wyq qwaszx!@' 'smb://192.168.1.111/Users/w14512/Downloads/hi/hilab' # ✅️
rm -rf ConfigDisk SerialFile Thumbs.db hilab.*
mkdir ~/Music/listen/epic-sound/L_0630b
mv -v * ~/Music/listen/epic-sound/L_0630b


# 3. post a file
# 3.1 method 1. curl
curl --upload-file "yo.txt" --user '\w14512:Wyq qwaszx!@' 'smb://192.168.1.111/Users/w14512/Downloads/hi/workspace/yo.txt'
# 3.1.2 post two files
echo hi > yo.txt
echo hi > yo1.txt
curl --upload-file '{yo.txt,yo1.txt}' --user '\w14512:Wyq qwaszx!@' 'smb://192.168.1.111/Users/w14512/Downloads/hi/workspace/'
# 3.2 smbclient
# 3.2.1 post 1
echo 'https://1drv.ms/x/c/fedac70e326ef338/Ednc4zfq6GBElLspI3apV24BeC1SzHWDaEQH469tjAHsDQ?e=z6pyAW' > yo.txt
smbclient --no-pass --user='\w14512%Wyq qwaszx!@' --ip-address='192.168.1.111' '\\Q13140Q\Users' \
          --command 'put yo.txt w14512/Downloads/hi/workspace/yo.txt' # ✅️

# post file
smbclient --no-pass --user='\w14512%Wyq qwaszx!@' --ip-address='192.168.1.111' '\\Q13140Q\Users' \
          --command 'put /home/me/Pictures/h3c-tests-main.xlsx w14512/Downloads/hi/workspace/h3c-tests-main.xlsx' # ✅️


smbclient --no-pass --user='\w14512%Wyq qwaszx!@' --ip-address='192.168.1.111' '\\Q13140Q\Users' \
          --command '
cd \w14512\Downloads\hi\workspace;
put yo.txt' # ✅️
# 3.2.2 mirror ./workspace to remote
touch ./workspace/hi{1..3}.txt
smbclient --no-pass --user='\w14512%Wyq qwaszx!@' --ip-address='192.168.1.111' '\\Q13140Q\Users' \
          --command '
cd \w14512\Downloads\hi\workspace;
prompt OFF;
recurse ON;
lcd ./workspace;
mput *'

smbclient //files.cluster.ins.localnet -W domain -U username \
          -c "prompt OFF; recurse ON; lcd $1; mkdir $2; cd $2; mput *"


x='
192.168.1.111 Q13140Q
'
smbget --no-pass --user='\w14512%Wyq qwaszx!@' 'smb://Q13140Q/Users/w14512/Downloads/hi/sync.sh' # ❌️: 🦜 : requires DNS, too complex

# --------------------------------------------------
smbget --no-pass --user='\w14512%Wyq qwaszx!@' 'smb://192.168.1.111/Users/w14512/Downloads/hi/tmp.txt' # ✅️

# --------------------------------------------------
# cp ixc-qa there
smbclient --no-pass --user='\w14512%Wyq qwaszx!@' --ip-address='192.168.1.111' '\\Q13140Q\Users' \
          --command '
cd \w14512\Downloads\hi\ixc-qa;
prompt OFF;
recurse ON;
lcd ./ixc-qa;
mput *'


# 2. folder ->  here
mkdir ./ixc-qa0
cd ./ixc-qa0
cp -v ../ixc-qa/* .
smbget --no-pass --resume --recursive --update --dots --user='\w14512%Wyq qwaszx!@' 'smb://192.168.1.111/Users/w14512/Downloads/hi/ixc-qa0' # ✅️
